import {request} from "../utils/request"
//查询所有帖子
export const streamChat = (message:any)=>{
    return request({
        url:"/ai/chat/stream",
        method:"GET",
        data:message
    })
}
export const saveMessageToRedis = (data:any)=>{
    return request({
        url:"/ai/save",
        method:"POST",
        data:data
    })
}
export const getAudio = (filePath:String)=>{
    return request({
        url:"/audio/getAudio",
        method:"GET",
        data:filePath
    })
}
export const getHistory = (userId:any)=>{
    return request({
        url:"/history/getHistory",
        method:"GET",
        data:{userId:userId}
    })
}
export const getMessage = (sessionId:any)=>{
    return request({
        url:"/history/getMessage",
        method:"GET",
        data:{sessionId:sessionId}
    })
}